package wfl.spec.edu;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ListAdapter;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

public class ActivityFirst extends AppCompatActivity {

    private List<wechat> wechatList=new ArrayList<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_first);
        initwechat();
        wechatAdapter adapter=new wechatAdapter(ActivityFirst.this,R.layout.item_layout,wechatList);
        ListView listView=(ListView) findViewById(R.id.list_view);
        listView.setAdapter((ListAdapter) adapter);
    }

    private void initwechat(){
        for(int i=0;i<2;i++){
            wechat w1=new wechat("订阅号消息","小新说车：什么是小众的豪华，这俩车能回答",R.drawable.a);
            wechatList.add(w1);
            wechat w2=new wechat("指云端","这个秋冬他们相继离世，癌症究竟是怎样摧...",R.drawable.b);
            wechatList.add(w2);
            wechat w3=new wechat("微信收款助手","微信支付收款4.00",R.drawable.c);
            wechatList.add(w3);
            wechat w4=new wechat("金大师为民服务","机构师说：[语音]",R.drawable.aaa);
            wechatList.add(w4);
            wechat w5=new wechat("春晖花园客户服务中心","[10条]春晖花园客服中心：@3_1_903水 有",R.drawable.bbb);
            wechatList.add(w5);
            wechat w6=new wechat("H161 师晨冰 涨价逻辑交流群","Aa严师高级助理_小胡(胡文涛)：[太阳]...",R.drawable.ccc);
            wechatList.add(w6);
            wechat w7=new wechat("微信团队","登录操作通知",R.drawable.ddd);
            wechatList.add(w7);
            wechat w8=new wechat("幼专教工足球协会","",R.drawable.d);
            wechatList.add(w8);
            wechat w9=new wechat("订阅号消息","小新说车：什么是小众的豪华，这俩车能回答",R.drawable.a);
            wechatList.add(w9);
            wechat w10=new wechat("指云端","这个秋冬他们相继离世，癌症究竟是怎样摧...",R.drawable.b);
            wechatList.add(w10);
            wechat w11=new wechat("微信收款助手","微信支付收款4.00",R.drawable.c);
            wechatList.add(w11);
            wechat w12=new wechat("金大师为民服务","机构师说：[语音]",R.drawable.aaa);
            wechatList.add(w12);
            wechat w13=new wechat("春晖花园客户服务中心","[10条]春晖花园客服中心：@3_1_903水 有",R.drawable.bbb);
            wechatList.add(w13);
        }
    }
}
